<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>百分比的布局</title>
</head>
<body>
    <div class="parent">
        <div class="son">
            <div class="gson"></div>
        </div>
    </div>
</body>

<style>
    body{
        margin: 0;
    }
    .parent{
        width: 80%;
        height:300px;
        background-color: black;
    }
    .son{
        width: 50%;
        height: 300px;
        background-color: azure;
    }
    /* 在500px 宽度的屏幕上，son的宽度是多少？250 200 */
    /**parent 400px  为什么 son是 200px 而不是 250px，百分比的基数是父元素**/

    .gson{
        width: 50%;
        height: 300px;
    }
</style>
</html>